import java.io.*;

/**
 * @ClassName Distribution2
 * @Description: TODO
 * @Author 远志 zhangsong@cskaoyan.onaliyun.com
 * @Date 2023/2/10 9:39
 * @Version V1.0
 **/
public class Distribution2 {

    private static final int NUMBER = 10;

    public static void main(String[] args) throws IOException {
        //需要每次读一行
        BufferedReader bufferedReader = new BufferedReader(new FileReader(new File("data.txt")));
        String line = null;
        while ((line = bufferedReader.readLine()) != null){
            int index = line.hashCode() % NUMBER ;
            if(index < 0){
                index = -index;
            }
            System.out.println("当前" + line + "进入到第" + index + "号主机/文件");
        }
    }
}
